package xyz.haijin.mybatisplus.model;

import java.io.Serializable;
import java.util.List;

/**
 * 分页对象
 */
public class PageBean<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    //页码
    private long currentPage;
    //页面记录数
    private long pageSize;
    //总页数
    private long totalPage;
    //总记录数
    private long totalCount;
    //分页记录
    private List<T> list;

    public PageBean() {
        super();
    }

    public long getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

	public PageBean(long currentPage, long pageSize, long totalPage, long totalCount, List<T> list) {
		super();
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.totalPage = totalPage;
		this.totalCount = totalCount;
		this.list = list;
	}

	@Override
	public String toString() {
		return "PageBean [currentPage=" + currentPage + ", pageSize=" + pageSize + ", totalPage=" + totalPage
				+ ", totalCount=" + totalCount + ", list=" + list + "]";
	}


}
